classdef ChiSquare < Algorithm & Metric
    %CHISQUARE Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
    end
    
    methods
        function [ this ] = ChiSquare( name )
            if nargin == 0
                this.setName('chi_square');
            end
            if nargin >= 1
                this.setName(name);
            end
        end
    end
    
    methods
        function [ result ] = apply( this, X2, Y2 )
            % Output
            %   result: zRank
            
            result = calcChiSquare(X2, Y2);
%             result.zScore = calcChiSquare(X2, Y2);
%             result.zRank = sort(zScore, 'descend');
        end
    end
    
    methods ( Static = true )
        function [ result ] = calc( X, Y )
            %CALC Calculate feature-label Chi-square score
            % Return the feature-label relevance and corresponding feature
            % ranking index for binary problem
            % Output
            %   result: zRank
            
            result = calcChiSquare(X, Y);
%             result.zScore = calcChiSquare(X, Y);
%             result.zRank = sort(result.zScore, 'descend');
        end
        
        function [ zRank ] = doRank( zScore )
            [~, zRank] = sort(zScore, 'descend');
        end
    end
end

